from dataclasses import dataclass


@dataclass
class LoggerConfig:
    """日志与可视化配置"""
    log_dir: str = "./logs"                 # 日志文件保存路径
    log_interval: int = 50                  # 每 N step 打印一次日志
    use_tensorboard: bool = True            # 是否启用 TensorBoard
    use_wandb: bool = False                 # 可扩展：是否启用 Weights & Biases
    verbosity: str = "info"                 # 日志级别：info / debug / warning

    def summary(self):
        print("🧾 日志与可视化配置")
        print(f"  日志目录: {self.log_dir}")
        print(f"  打印间隔: 每 {self.log_interval} step")
        print(f"  TensorBoard: {self.use_tensorboard}")
        print(f"  WandB: {self.use_wandb}")
        print(f"  日志级别: {self.verbosity}")